{% extends "default.html" %}

{% load i18n %}
{% load jalali_view %}
{% load digg_paginator %}

{% block title %} {% trans "Ad Orders List" %}{% endblock %}
{% block page_title %} {% trans "Ad Orders List" %}{% endblock %}

{% block page_content %}
<div>
	<div>
	<table>
		<thead>
			<tr>
				<th><!-- {% trans "Paid" %}--></th>
				<th>{% trans "Title" %}</th>
				<th>{% trans "Registration Date" %}</th>
				<th>{% trans "Publish Start Date" %}</th>
				<th>{% trans "Publish End Date" %}</th>
				<th>{% trans "Amount" %}</th>
				<th></th>
			</tr>
		</thead>
		{% for o in current_page.object_list %}
		<tr class='{% cycle "Odd" "Even" %}'>
			<td>
			{% if o.paid %}
			<img src="/static/images/ok.png" />
			{% else %}
			<img src="/static/images/nok.png" />
			{% endif %}
			</td>
			<td>{{ o.ad.title }}</td>
			<td>{% jalali_view o.ad.registration_date %}</td>
			<td>{% jalali_view o.ad.start_date %}</td>
			<td>{% jalali_view o.ad.end_date %}</td>
			<td>{{ o.amount }}</td>
			<td>
				{% if not o.paid %}
				<a href="/ads/orders/pay/{{ o.id }}/">{% trans "Pay" %}</a>
				{% endif %}
			</td>
		</tr>
		{% endfor %}
	</table>
	</div>
	<br class="clear"/>
	<div>
	{% digg_paginator %}
	<br class="clear"/>
	</div>
</div>



{% endblock page_content %}
